﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

using Jungle.Blog;
using Jungle.Forum;
using Jungle.Articles;
using Jungle.News;

namespace Poker.Admin
{
    public partial class rss : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            switch (Request["s"])
            { 
                case "news":
                    Response.Write(NewObject.GenereateRss());
                    break;
                case "articles":
                    Response.Write(Article.GenereateRss());
                    break;
                case "blogs":
                    Response.Write(Post.GenereateRss());
                    break;
                case "blog":
                    if (Request["user"] != null)
                    {
                        Response.Write(Post.GenereateRssByUser(Convert.ToInt32(Request["user"])) + "asdasd");
                    }
                    break;
                case "forum":
                    if (Request["c"] != null)
                    {
                        ForumCategory cat = new ForumCategory();
                        cat.ForumCategoryID = Convert.ToInt32(Request["c"]);
                        cat.GetById();
                        Response.Write(cat.GenereateRss());
                    }
                    if (Request["th"] != null)
                    {
                        ForumThemes theme = new ForumThemes();
                        theme.ForumThemeId = Convert.ToInt32(Request["th"]);
                        theme.GetByTheemeId();
                        Response.Write(theme.GenereateRss());
                    }
                    break;

            }
        }
    }
}
